// staticData.js
export const staticData = {
  // 测试参场景
  leftTableData: [
    {
      cust_id: "421023112313",
      licence_no: "421023112313",
      store_name: "娜家便利店",
      county_id: "11421004",
      market_id: "11421004008",
      artificial_person: "伍新光",
      created_time: "2020/4/10",
      periods: "7:5",
      sale: 200,
      cust_segment: "16",
      law_state: "1",
      multiple_shop: "1",
    },
    {
      cust_id: "421023112084",
      licence_no: "421023112084",
      store_name: "无",
      county_id: "11421004",
      market_id: "11421004025",
      artificial_person: "王汝琴",
      created_time: "2019/9/19",
      periods: "7:4",
      sale: 562,
      cust_segment: "16",
      law_state: "1",
      multiple_shop: "1",
    },
    {
      cust_id: "421023111766",
      licence_no: "421023111766",
      store_name: "交通便利店",
      county_id: "11421004",
      market_id: "11421004026",
      artificial_person: "陈永涛",
      created_time: "2018/11/12",
      periods: "7:1",
      sale: 1002,
      cust_segment: "16",
      law_state: "1",
      multiple_shop: "1",
    },
    {
      cust_id: "421023111813",
      licence_no: "421023111813",
      store_name: "无",
      county_id: "11421004",
      market_id: "11421004025",
      artificial_person: "胡超金",
      created_time: "2018/12/25",
      periods: "7:4",
      sale: 700,
      cust_segment: "16",
      law_state: "1",
      multiple_shop: "1",
    },
  ],
  //查询2024年订单量超过3000箱的客户信息及销量
  // 返回的数据可能不是下面那些
  rightTableData: {
    tableData: [
      {
        cust_name: "赵六",
        cust_id: "421002123132",
        licence_address: "湖北省荆州市监利市新沟镇全心村九组9号",
        cust_segment: "15",
        sales_volume: 54970
      },
      {
        cust_name: "钱七",
        cust_id: "421003103493",
        licence_address: "湖北省荆州市监利县黄歇口镇李场村五组55号",
        cust_segment: "22",
        sales_volume: 33570
      },
      {
        cust_name: "陈永涛",
        cust_id: "421023111766",
        licence_address: "湖北省荆州市监利市新沟镇全心村九组7号",
        cust_segment: "15",
        sales_volume: 54970
      },
      {
        cust_name: "胡超金",
        cust_id: "421023111813",
        licence_address: "湖北省荆州市监利市黄歇口镇三潭村七组18号",
        cust_segment: "05",
        sales_volume: 33570
      },
      {
        cust_name: "王汝琴",
        cust_id: "421023112084",
        licence_address: "湖北省荆州市监利县黄歇口镇李场村五组135号",
        cust_segment: "17",
        sales_volume: 33570
      },
      {
        cust_name: "伍新光",
        cust_id: "421023112313",
        licence_address: "湖北省荆州市监利县红城乡恒福新里程2-151号",
        cust_segment: "29",
        sales_volume: 12220
      },
      {
        cust_name: "李四",
        cust_id: "421023113287",
        licence_address: "湖北省荆州市监利县红城乡恒福新里程2-656号",
        cust_segment: "29",
        sales_volume: 23540
      },
      {
        cust_name: "沙西",
        cust_id: "421023113830",
        licence_address: "湖北省荆州市监利县",
        cust_segment: "22",
        sales_volume: 33570
      },
      {
        cust_name: "万敏",
        cust_id: "421081108943",
        licence_address: "湖北省荆州市石首市净莲街17号",
        cust_segment: "12",
        sales_volume: 105970
      },
      {
        cust_name: "张三",
        cust_id: "421081108955",
        licence_address: "湖北省荆州市监利县",
        cust_segment: "12",
        sales_volume: 33570
      },
      {
        cust_name: "王五",
        cust_id: "421083108705",
        licence_address: "湖北省荆州市监利市黄歇口镇三潭村七组64号",
        cust_segment: "05",
        sales_volume: 33570
      }
    ],
    sql: "SELECT vcu.cust_name, vcu.cust_id, vcu.licence_address, vcu.cust_segment, sum(tf.qty_order * te.conversion_scale) AS sales_volume FROM fn_sell tf, v_mm_md_customer vcu, md_cigarette_package_exchange te WHERE te.cig_id = tf.cig_id AND vcu.market_id = tf.market_id AND tf.sell_date >= '2024-01-01' AND tf.sell_date <= '2024-12-31' GROUP BY vcu.cust_name HAVING sum(tf.qty_order * te.conversion_scale) > 3000"
  },

  // 场景2
  //查询沙市营销部最近三年有违法违规记录的客户
  law_stateTableData_2: {
    tableData: [
      {
        cust_name: "京北",
        cust_id: "421081108955",
        store_name: "京北烟草",
        licence_address: "湖北省荆州市石首市净莲街17号",
        cust_segment: "02",
        law_state: "2",
        market_id: "11421006015",
      },
      {
        cust_name: "沙监",
        cust_id: "421083108705",
        store_name: "沙监洪店",
        licence_address: "湖北省荆州市监利市黄歇口镇三潭村七组64号",
        cust_segment: "09",
        law_state: "2",
        market_id: "11421008019",
      },

    ],
    sql: "SELECT DISTINCT  vcu.cust_name,  vcu.cust_id,vcu.store_name , vcu.licence_address,vcu.cust_segment,vcu.law_state, vcu.market_id FROM v_mm_md_customer  vcu WHERE  vcu.law_state='1' GROUP BY  vcu.cust_id"
  },

  // 场景3 无目的性查询
  //查询沙市营销部不属于连锁店的客户
  law_stateTableData_3: {
    tableData: [
      {
        cust_name: "京北",
        cust_id: "421081108955",
        store_name: "京北烟草",
        licence_address: "湖北省荆州市石首市净莲街17号",
        cust_segment: "02",
        law_state: "2",
        market_id: "11421006015",
        multiple_shop: "0",
      },
      {
        cust_name: "沙监",
        cust_id: "421083108705",
        store_name: "沙监洪店",
        licence_address: "湖北省荆州市监利市黄歇口镇三潭村七组64号",
        cust_segment: "09",
        law_state: "2",
        market_id: "11421008019",
        multiple_shop: "0",
      },
      {
        cust_name: "美家",
        cust_id: "421023112313",
        store_name: "美家便利店",
        licence_address: "湖北省荆州市监利县",
        cust_segment: "23",
        law_state: "1",
        market_id: "11421009016",
        multiple_shop: "0",
      },

    ],
    sql: "SELECT DISTINCT vcu.store_name ,vcu.cust_id , vcu.cust_name , vcu.licence_address, vcu.cust_segment,  vcu.law_state,vcu.market_id,vcu.multiple_shop FROM v_mm_md_customer vcu, v_mm_md_org_unit vu WHERE  vu.company_id = vcu.company_id AND vu.short_name = '沙市' AND vcu.multiple_shop = '0' GROUP BY  vcu.cust_segment"
  },
  // 场景4
  //查询沙市营销部客户分档在15以上的优质客户
  segmentTableData: {
    tableData: [
      {
        cust_name: "王汝琴",
        cust_id: "421023112084",
        store_name: "无",
        licence_address: "湖北省荆州市监利县黄歇口镇李场村五组135号",
        cust_segment: "16",
      },
      {
        cust_name: "陈永涛",
        cust_id: "421023111766",
        store_name: "交通便利店",
        licence_address: "湖北省荆州市监利市新沟镇全心村九组7号",
        cust_segment: "16",
      },
      {
        cust_name: "洪李",
        cust_id: "421023113830",
        store_name: "洪李店",
        licence_address: "湖北省荆州市监利市新沟镇全心村九组9号",
        cust_segment: "21",
      },
      {
        cust_name: "美家",
        cust_id: "421023112313",
        store_name: "美家便利店",
        licence_address: "湖北省荆州市监利县",
        cust_segment: "23",
      },
      {
        cust_name: "沙西",
        cust_id: "421023113287",
        store_name: "沙西便利店",
        licence_address: "湖北省荆州市监利县红城乡恒福新里程2-656号",
        cust_segment: "22",
      }

    ],
    sql: " SELECT  vcu.store_name ,vcu.cust_id , vcu.cust_name , vcu.licence_address, vcu.cust_segment FROM v_mm_md_customer vcu WHERE vcu.cust_segment >15 GROUP BY   vcu.cust_segment"
  },
  // 场景5
  //查询松滋营销部能销售雪茄的客户
  customTableData: {
    tableData: [
      {
        cust_id: "421023111813",
        store_name: "无",
        cust_name: "胡超金",
        licence_address: "湖北省荆州市监利市黄歇口镇三潭村七组18号",
        cust_segment: "05",
      },
      {
        cust_id: "421081108943",
        store_name: "石首市海之缘便利店",
        cust_name: "万敏",
        licence_address: "湖北省荆州市石首市净莲街17号",
        cust_segment: "12",
      },
      {
        cust_id: "421023111766",
        store_name: "交通便利店",
        cust_name: "陈永涛",
        licence_address: "湖北省荆州市监利市新沟镇全心村九组7号",
        cust_segment: "15",
      },
      {
        cust_id: "421023112084",
        store_name: "无",
        cust_name: "王汝琴",
        licence_address: "湖北省荆州市监利县黄歇口镇李场村五组135号",
        cust_segment: "17",
      },
    ],
    sql: "SELECT  vcu.cust_id ,vcu.store_name , vcu.cust_name , vcu.licence_address,vcu.cust_segment FROM fn_sell tf,v_mm_md_customer vcu,v_mm_md_cigarette vci,v_mm_md_org_unit vuWHERE tf.cust_id = vcu.cust_id AND tf.cig_id=vci.cig_id AND vci.cig_type IN (3,5,6) AND vu.company_id = vcu.company_id GROUP BY  vcu.cust_segment"

  },
  // 场景5
  //查询徐xx客户2024年5月历史订单
  historyTableData: {
    tableData: [
      //    {
      //    totalorder:"8",
      //    totalsales_volume: "780",
      //    },
      {
        order_id: "100400123932",
        sales_volume: "130",
      },
      {
        order_id: "100400123953",
        sales_volume: "60",
      },
      {
        order_id: "100400124183",
        sales_volume: "140",
      },
      {
        order_id: "100400124312",
        sales_volume: "80",
      },
      {
        order_id: "100400124112",
        sales_volume: "140",
      },
      {
        order_id: "100400123936",
        sales_volume: "90",
      },
      {
        order_id: "100400123926",
        sales_volume: "140",
      },
      {
        order_id: "100400123729",
        sales_volume: "50",
      },
    ],
    sql: "SELECT  order_id ,sum(tf.qty_order * te.conversion_scale) FROM  fn_sell tf,md_cigarette_package_exchange te,v_mm_md_customer vcu,v_mm_md_cigarette vci WHERE tf.market_id=vcu.market_id AND  tf.cig_id=vci.cig_id AND vci.cig_id=te.cig_id AND cust_name='陈永涛'AND tf.sell_date<='2024-05-31'AND tf.sell_date>='2024-05-01'GROUP BY  order_id"
  }
};
